<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://displaytag.sf.net" prefix="display"%>

<!-- becomes the css class of the li element -->
<c:set var="is_crew_edit_mode" value="true" scope="request" />

<html>
<head>
<title>Edit Crew</title>
</head>

<body>
	<form:form method="POST" commandName="crew">
		<div class="column left">
			<p>
				<label for="newMember">Add new member to ship crew:</label>
				<form:select path="newMember" cssClass="text">
					<form:options items="${employees}" itemLabel="label" itemValue="id" />
				</form:select>
				<span class="info">Please select"</span>
			</p>
			<p>
				<input type="submit" value="Add">
			</p>
		</div>
		<div class="clear"></div>

	<display:table uid="empl" name="${crew.crew}" pagesize="10" class="dt">
			<display:column property="sirName" sortable="true" title="Sir Name"
				maxLength="60" />
			<display:column property="firstName" sortable="true"
				title="First Name" maxLength="60" />
			<display:column property="phoneNumber" sortable="false"
				title="Phone Number" maxLength="15" />
			<display:column property="qualification" sortable="false"
				title="Qualification" maxLength="50" />
			<display:column property="function" sortable="false"
				title="Current Function" maxLength="50" />
			<display:column>
				<a href="<c:url value='removefromcrew.htm?emplId=${empl.id}'/>"><img
					src="<c:url value='images/delete.png'/>" /> </a>
			</display:column>
		</display:table>
	</form:form>
	<p>
		<a href="<c:url value='ships.htm'/>">Back</a>
	</p>
</body>
</html>